package kuonjisai.swing.component;

import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JLabel;
import java.awt.BorderLayout;
import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.BoxLayout;
import javax.swing.ImageIcon;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class J26_SungJukAboutDialog extends JDialog{

	
	public J26_SungJukAboutDialog( JFrame p ) {
		super(p );
		setTitle("프로젝트 정보");
		setBounds(300, 300, 400, 450);
		setModalityType( ModalityType.DOCUMENT_MODAL );
		JPanel wesp = new JPanel();
		
		getContentPane().add(wesp, BorderLayout.WEST);
		wesp.setLayout(new BorderLayout(0, 0));
		
		JLabel imglbl = new JLabel("");
		imglbl.setIcon(new ImageIcon(J26_SungJukAboutDialog.class.getResource("/img/gacha_buno.jpg")));
		wesp.add(imglbl);
		
		JPanel eastp = new JPanel();
		getContentPane().add(eastp, BorderLayout.EAST);
		eastp.setLayout(new BoxLayout(eastp, BoxLayout.X_AXIS));
		
		JLabel introlbl = new JLabel("분.노.한.다.");
		introlbl.setIcon(null);
		eastp.add(introlbl);
		
		JPanel southp = new JPanel();
		getContentPane().add(southp, BorderLayout.SOUTH);
		
		
		JButton okbtn = new JButton("확인");
		okbtn.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
			// system.exit 사용 불가
			//	System.exit(0);
				setVisible( false );	// aboutDialog를 화면에서 지우고
			dispose();	// 메모리에 생성된 about dialog 객체를 제거
			
			}
		});
		southp.add(okbtn);
	
		
		
		setVisible(true);
		
		
	}









} // class


